import request from '@/utils/request'

// 统计包裹
export function countPackageByTime(data) {
    return request({
        url: `/data/count/countPackageByTime?time=${data.time}`,
        method: 'post'
    })
}

/** 当日快递统计 */
export function listByToday(time, datatype='', endTime) {
    return request({
        url: `/system/count/listByToday?time=${time}&datatype=${datatype}&endTime=${endTime}`
    })
}

/** 按服务点统计包裹 */
export function stationOrder(time) {
    return request({
        url: `/package/package/stationOrder?startTime=${time.startTime}&endTime=${time.endTime}`
    })
}

/** 按时间统计包裹 */
export function timeOrder(time) {
    return request({
        url: `/package/package/timeOrder?startTime=${time.startTime}&endTime=${time.endTime}`
    })
}
export function selectByNo(no) {
    return request({
        url: `/package/package/selectByNo?no=${no}`
    })
}
/** 走势图 */
export function trendByTime({time, type, datatype, endTime}) {
  return request({
    url: `/system/count/countByTime?time=${time}&type=${type}&datatype=${datatype}&endTime=${endTime}`
  })
}

/** 数据报表服务点包裹统计 */
export function countByTime({orde, name, startTime, endTime}) {
  return request({
    url: `/system/postpackcount/countByTime?orde=${orde}&name=${name}&startTime=${startTime}&endTime=${endTime}`
  })
}

//专线统计
export function specialTrainList(params) {
  return request({
    url: `/web/bp/statistics/specialTrainList`,
    method: 'post',
    params
  })
}
  
//包车统计
export function charteredBusList(params) {
    return request({
        url: `/web/bp/statistics/charteredBusList`,
        method: 'post',
        params
    })
}

//打车统计
export function takeTaxiList(params) {
    return request({
        url: `/web/bp/statistics/takeTaxiList`,
        method: 'post',
        params
    })
}